package com.sdk.springbootadvancedsearch.domain.request;

import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

@Data
public class FilterCondition {

    @ApiModelProperty("查询的字段名")
    @NotBlank(message = "查询字段名不能为空")
    private String key;

    @ApiModelProperty("查询的字段类型，可选值为:string, number, date, boolean")
    @NotBlank(message = "查询的字段类型不能为空")
    private String type;

    @ApiModelProperty("字段在数据库的查询模式，可选值为:eq, like, in, gt, gte, lt, lte, between")
    @NotBlank(message = "字段在数据库的查询模式不能为空")
    private String mode;

    @ApiModelProperty("页面输入的值")
    @NotNull(message = "页面输入的值不能为空")
    private Object value;
}
